import { GETAYTHORDATA, GETAUTHORVIDEODATA } from "../action/actionType";

export let author = (state = {
    authorData: null,
    authorVideoData: null,
}, action) => {
    let {
        type
    } = action;
    let newState = {
        ...state
    };
    switch (type) {
        case GETAYTHORDATA:
            newState.authorData = action.data;
            return newState
            break;
        case GETAUTHORVIDEODATA:
            newState.authorVideoData = action.data;
            return newState
            break;
        
        default:
            return newState
            break;
    }
}